<template>
  <div>
    子组件 --- {{ value }}
    <button @click="hClick">子组件的数据</button>
  </div>
</template>

<script>
export default {
  props: {
    value: {
      type: Number,
      default: 0
    }
  },
  methods: {
    hClick() {
      console.log(this.value)
      this.$emit('input', this.value + 1)
    }
  }
}
</script>

<style lang="scss" scoped>

</style>
